package ar.edu.caece.compiler.grammar.attributes.tree;

public class NodeConstante extends NodeExpr {
	private String constName;
	private String idVariable;
	
	public NodeConstante(String constName, String idVariable) {
		super();
		this.constName = constName;
		this.idVariable = idVariable;
	}


	public NodeConstante(String constName) {
		super();
		this.constName = constName;
	}
	

	public String getConstName() {
		return constName;
	}
	public void setConstName(String constName) {
		this.constName = constName;
	}
	
	public String toString() {
		return "[Nodo constante: -> " + constName +" ]";
	}


	@Override
	public String generateCode() {
		return idVariable + " dw " ;
	}


	public void setIdVariable(String idVariable) {
		this.idVariable = idVariable;
	}


	public String getIdVariable() {
		return idVariable;
	}
}
